#pragma once
#include "..\common.h"
#include "DAbstract.h"
#include "DMaterial.h"

namespace DeepClasses
{

	class DObject: public DAbstract
	{
	public:
		DObject(DString name, wchar_t code, short color);
		virtual ~DObject();

		wchar_t m_code;
		short m_color;
		DString m_name;

		DMaterial* m_mainMat;

		TLocation m_pos;

		virtual int Move(TLocation newLoc);
		virtual int Place(TLocation newLoc);
		virtual int Remove();
		virtual int Tick();
	private:
		bool m_cached;
		void SetCachedFlag();
		bool IsCached();
	};
};